int residue(int total, int days);